package com.hakim.wfb.customer.service.convert.goods;

import com.hakim.wfb.bean.GoodsList;
import com.hakim.wfb.bean.ReceiveAddress;
import com.hakim.wfb.customer.params.order.ReceiveAddressParameter;
import com.hakim.wfb.customer.result.goods.GoodsListView;
import com.hakim.wfb.customer.result.order.ReceiveAddressView;

/**
 * Created by lenovo on 2017/7/15.
 */
public class ReceiveAdressDtv {
    public static ReceiveAddress parameter2Obj(ReceiveAddressParameter obj) {
        ReceiveAddress addr = new ReceiveAddress();
        addr.setTid(obj.getTid());
        addr.setRaAddr(obj.getRaAddr());
        addr.setRaPhone(obj.getRaPhone());
        addr.setRaUser(obj.getRaUser());
        addr.setRaName(obj.getRaName());
        return addr;
    }

    public static ReceiveAddress view2Obj(ReceiveAddressView obj) {
        ReceiveAddress addr = new ReceiveAddress();
        addr.setTid(obj.getTid());
        addr.setRaAddr(obj.getRaAddr());
        addr.setRaPhone(obj.getRaPhone());
        addr.setRaUser(obj.getRaUser());
        addr.setRaName(obj.getRaName());
        return addr;
    }

    public static ReceiveAddressView convert2View(ReceiveAddress obj) {
        ReceiveAddressView addr = new ReceiveAddressView();
        addr.setTid(obj.getTid());
        addr.setRaAddr(obj.getRaAddr());
        addr.setRaPhone(obj.getRaPhone());
        addr.setRaUser(obj.getRaUser());
        addr.setRaName(obj.getRaName());
        return addr;
    }
}
